#include <iostream>
#include <string>
#include <cstdlib>

void showUsage() {
    std::cout << "DevOps Platform Commands:\n";
    std::cout << "  build vs2022    - Build with Visual Studio 2022\n";
    std::cout << "  build vs2005    - Build with Visual Studio 2005\n";
    std::cout << "  status          - Show build status\n";
    std::cout << "  clean           - Clean build files\n";
    std::cout << "  help            - Show this help\n";
}

void showStatus() {
    std::cout << "=== DevOps Platform Status ===\n";
    std::cout << "Build Targets:\n";
    std::cout << "  VC++2022: CMake + Visual Studio 2022\n";
    std::cout << "  VC++2005: NMake + Visual Studio 2005\n";
    std::cout << "Multi-Compiler Support: Active\n";
}

int main(int argc, char* argv[]) {
    std::cout << "=== DevOps Platform ===" << std::endl;
    std::cout << "Compiler: Multi-target (VC++2005/2022)" << std::endl;
    std::cout << "CI/CD Engine: Ready" << std::endl;
    std::cout << "=========================" << std::endl;
    
    if (argc > 1) {
        std::string command = argv[1];
        
        if (command == "status") {
            showStatus();
        }
        else if (command == "clean") {
            std::cout << "Cleaning builds...\n";
            system("if exist build rmdir /s /q build");
            system("if exist build-vc2005 rmdir /s /q build-vc2005");
            std::cout << "Clean completed!\n";
        }
        else if (command == "help") {
            showUsage();
        }
        else {
            showUsage();
        }
    } else {
        showUsage();
    }
    
    return 0;
}
